As shown in FIG. 1, a conventional camera module 10 includes a circuit board 11, a photosensitive chip 12 located on the circuit board 11, a package material body 13 attached on the circuit board 11 and extending onto the photosensitive chip 12, electronic components 14 and conductive wires 15 in the package material body 13, a filter 16, and a lens assembly. The lens assembly includes a barrel 17 and a plurality of lenses (not shown) received in the barrel 17. A stepped hole for receiving the filter 16 is defined on a surface of the package material body 13 away from the circuit board 11. The surface of the package material body 13 away from the circuit board 1 is further used to connect to the barrel 17. As a carrier of the filter 16 and the lens assembly, the package material body 13 needs to have a certain strength. This requires the package material body 13 to have a certain size in each of three directions along X, Y, and Z axes. However, as an optical axis 10a of the camera module 10 is parallel to the Z axis, the larger the length of the package material body 13 in the Z axis direction, the harder for controlling a central axis of a light transmission hole of the package material body 13 to be coaxial with the optical axis 10a. This makes it harder to obtain a camera module having higher imaging quality.